package com.woniuxy.base.service.impl;


import com.woniuxy.base.mapper.BaseAreaRecordMapper;
import com.woniuxy.base.model.entity.BaseAreaRecord;
import com.woniuxy.base.service.BaseAreaRecordService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class BaseAreaRecordServiceImpl implements BaseAreaRecordService {
    @Resource
    private BaseAreaRecordMapper recordMapper;
    @Override
    public void add(BaseAreaRecord areaRecord) {
        recordMapper.insert(areaRecord);
    }

    @Override
    public List<BaseAreaRecord> detail(Integer areaId) {
        Map<String,Object> condition = new HashMap<>();
        condition.put("area_id", areaId);
        return recordMapper.selectByMap(condition);
    }
}
